package com.sohoometer.demo;

import java.text.SimpleDateFormat;
import java.util.Date;

import org.quartz.Calendar;
import org.quartz.Job;
import org.quartz.JobDetail;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.quartz.ScheduleBuilder;
import org.quartz.Scheduler;
import org.quartz.SchedulerFactory;
import org.quartz.Trigger;
import org.quartz.impl.JobDetailImpl;
import org.quartz.impl.triggers.CronTriggerImpl;

/**
 * 定时测试
 * */
public class QuartzTest {
	
	
	public static void main(String[] args) {
		Job job = new Job() {
			@Override
			public void execute(JobExecutionContext context)
					throws JobExecutionException {
				Date time = context.getFireTime();
				String pattern = "yyyy-MM-dd HH:mm:ss";
				SimpleDateFormat simpleDateFormat = new SimpleDateFormat(pattern);
				System.out.println("您好,当前运行时间为"+simpleDateFormat.format(time));
			}};
			JobDetail jobDetail = new JobDetailImpl();
			Trigger trigger = new CronTriggerImpl();
		
	}
}
